<?php

namespace Modules\Car\Entities;

use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Support\Carbon;

class CustomerFoot extends Model
{
    use HasFactory;
    protected $appends=['diff_time'];
    protected $guarded = [];

    protected function serializeDate(\DateTimeInterface $date)
    {
        return $date->format('Y-m-d H:i:s');
    }
    protected function getDiffTimeAttribute()
    {
       return Carbon::parse($this->created_at)->diffInSeconds($this->updated_at);
    }
}
